翻訳と辞書
Words near each other
・ FASTA
・ Fasta (Frisian)
・ FASTA format
・ Fasta Åland
・ Fastachee
・ FASTag
・ Fastaq
・ Fastaqim Kama Umirt
・ Fastaval
・ FastBack
・ Fastback
・ Fastback (comics)
・ Fastback (disambiguation)
・ Fastbacks
・ Fastball
Fast inverse square root
・ Fast ion conductor
・ Fast Japanese Spin Cycle
・ Fast Kalman filter
・ Fast Lane (Bad Meets Evil song)
・ Fast Lane (Bilal song)
・ Fast Lane (Cedar Fair)
・ Fast Lane (E-ZPass)
・ Fast Lane (video game)
・ Fast Lane Addiction
・ Fast Lane Daily
・ Fast Lane Ventures
・ Fast Lanes and Country Roads
・ Fast Last!
・ Fast Library for Number Theory


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Fast inverse square root : ウィキペディア英語版
Fast inverse square root

Fast inverse square root (sometimes referred to as Fast InvSqrt() or by the hexadecimal constant 0x5f3759df) is a method of calculating x−½, the reciprocal (or multiplicative inverse) of a square root for a 32-bit floating point number in IEEE 754 floating point format. The algorithm was probably developed at Silicon Graphics in the early 1990s, and an implementation appeared in 1999 in the ''Quake III Arena'' source code, but the method did not appear on public forums such as Usenet until 2002 or 2003.〔 (There is a discussion on Chinese developer forum CSDN back in 2000〔) At the time, the primary advantage of the algorithm came from avoiding computationally expensive floating point operations in favor of integer operations. Inverse square roots are used to compute angles of incidence and reflection for lighting and shading in computer graphics.
The algorithm accepts a 32-bit floating point number as the input and stores a halved value for later use. Then, treating the bits representing the floating point number as a 32-bit integer, a logical shift right of one bit is performed and the result subtracted from the magic number 0x5f3759df. This is the first approximation of the inverse square root of the input. Treating the bits again as floating point it runs one iteration of Newton's method to return a more precise approximation. This computes an approximation of the inverse square root of a floating point number approximately four times faster than floating point division.
The algorithm was originally attributed to John Carmack, but an investigation showed that the code had deeper roots in both the hardware and software side of computer graphics. Adjustments and alterations passed through both Silicon Graphics and 3dfx Interactive, with Gary Tarolli's implementation for the SGI Indigo as the earliest known use. It is not known how the constant was originally derived, though investigation has shed some light on possible methods.
==Motivation==

The inverse square root of a floating point number is used in calculating a normalized vector. Since a 3D graphics program uses these normalized vectors to determine lighting and reflection, millions of these calculations must be done per second. Before the creation of specialized hardware to handle transform and lighting, software computations could be slow. Specifically, when the code was developed in the early 1990s, most floating point processing power lagged behind the speed of integer processing.〔
To normalize a vector, the length of the vector is determined by calculating its Euclidean norm: the square root of the sum of squares of the vector components. When each component of the vector is divided by that length, the new vector will be a unit vector pointing in the same direction.
:\|\boldsymbol\| = \sqrt is the Euclidean norm of the vector, analogous to the calculation of the Euclidean distance between two points in Euclidean space.
:\boldsymbol / \|\boldsymbol\| is the normalized (unit) vector. Using \|\boldsymbol\|^2 to represent v_1^2+v_2^2+v_3^2,
:\boldsymbol / \sqrt, which relates the unit vector to the inverse square root of the distance components.
''Quake III Arena'' used the fast inverse square root algorithm to speed graphics processing unit computation, but the algorithm has since been implemented in some dedicated hardware vertex shaders using field-programmable gate arrays (FPGA).

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Fast inverse square root」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.